<template>
  <el-dialog
    :visible.sync="visible"
    :title="editTitle"
    width="800px"
    top="30px"
    class="dialog-sm"
    append-to-body
    :close-on-click-modal="false"
    :before-close="beforeClose"
  >
    <goods-credit-need :goods-id="goodsId"></goods-credit-need>
  </el-dialog>
</template>

<script>
import GoodsCreditNeed from '@/credit/views/province/goods/GoodsCreditNeed'

export default {
  components: {
    GoodsCreditNeed,
  },
  props: {
    visible: Boolean,
    formData: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {}
  },
  computed: {
    editTitle() {
      return `${this.formData.load_name || '产品'} - 融资方案`
    },
    goodsId() {
      return this.formData.industrial_package_id
    },
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
  },
}
</script>

<style lang="scss" scoped></style>
